#ifndef __RING_BUFFER_H
#define __RING_BUFFER_H

#include "types.h"  

#ifdef __cplusplus
 extern "C" {
#endif

 
 
typedef struct
{
	
  INT32U uRead;
  INT32U uWrite;
  INT8U *puMemory;
  INT32U uSize;
} Buffer_TypeDef;
/**
  * @}
  */

/* Exported functions --------------------------------------------------------------------------------------*/

void Buffer_Init(Buffer_TypeDef *pBuffer, INT8U *puMemory, INT32U uSize);
INT32U Buffer_ReadByte(Buffer_TypeDef *pBuffer, INT8U *puData);
INT32U Buffer_WriteByte(Buffer_TypeDef *pBuffer, INT8U uData);
INT32U Buffer_Read(Buffer_TypeDef *pBuffer, INT8U *puData, INT32U uLength);
INT32U Buffer_Write(Buffer_TypeDef *pBuffer, INT8U *puData, INT32U uLength);
INT32U Buffer_isEmpty(Buffer_TypeDef *pBuffer);
INT32U Buffer_isFull(Buffer_TypeDef *pBuffer);
INT32U Buffer_GetLength(Buffer_TypeDef *pBuffer);
void Buffer_Discard(Buffer_TypeDef *pBuffer);



#ifdef __cplusplus
}
#endif

#endif
